#include<bits/stdc++.h>
using namespace std;
int main(void)
{
	string a,b;
	cin>>a>>b;
	while(a.size()<4) a='0'+a; //0009
    while(b.size()<4) b=b+'0'; //5000
	cout<<a<<" "<<b;
	return 0;
}

/*
    ① char a; a-'0' //char --> int 
    ② int b; b+'0' //int --> char
*/
